package main

import "fmt"

func main() {
	str := "abcd"
	// 默认返回index 和 value 两个值
	for index, value := range str {
		fmt.Println(index, value)
	}
	test1()
}

func test1() {
	str := "abc"
	for index := range str {
		fmt.Println(index) // 0,1,2
	}
}
